﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Origin2.Core
{
    /// <summary>
    /// A control, that essentially represents a component of an object: examples include a timed death, collision, physics, etc.
    /// </summary>
    public class Control
    {
        /// <summary>
        /// The IControllable that is containing this control (should only be set by constructor)
        /// </summary>
        public IControllable Parent { get; private set; }

        /// <summary>
        /// A basic constructor
        /// </summary>
        /// <param name="parent"> The IControllable that is containing this control </param>
        public Control(IControllable parent)
        {
            Parent = parent;
        }

        /// <summary>
        /// Updates the control
        /// </summary>
        /// <param name="gameTime"> The GameTime variable </param>
        public virtual void Update(GameTime gameTime)
        {
            
        }

        /// <summary>
        /// Draws the control
        /// </summary>
        /// <param name="spriteBatch"> The SpriteBatch to draw to </param>
        public virtual void Draw(SpriteBatch spriteBatch)
        {
            
        }
    }
}
